home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: Mailbox/MIME Entity
(archive/mbox).
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| Mailbox/MIME Entity (archive/mbox)
| magic
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| ASCII text
| default
| |
100%
| checkBytes
| Printable ASCII
| default
| |
100%
| perlTextCheck
| Likely Text (Perl)
| default
| |
100%
| siegfried
| fmt/950 MIME Email (1.0)
| default
| |
100%
| detectItEasy
| Format: plain text[LF]
| default (weak)
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 4e 65 77 73 67 72 6f 75 | 70 73 3a 20 63 6f 6d 70 |Newsgrou|ps: comp|
|00000010| 2e 6c 61 6e 67 2e 63 0a | 50 61 74 68 3a 20 45 55 |.lang.c.|Path: EU|
|00000020| 2e 6e 65 74 21 73 75 6e | 34 6e 6c 21 72 69 76 6d |.net!sun|4nl!rivm|
|00000030| 21 6e 65 77 73 0a 46 72 | 6f 6d 3a 20 22 41 2e 20 |!news.Fr|om: "A. |
|00000040| 76 61 6e 20 4b 65 73 73 | 65 6c 22 20 3c 69 6d 61 |van Kess|el" <ima|
|00000050| 61 76 6b 3e 0a 53 75 62 | 6a 65 63 74 3a 20 52 65 |avk>.Sub|ject: Re|
|00000060| 3a 20 43 4f 52 52 45 43 | 54 49 4f 4e 3a 20 20 72 |: CORREC|TION: r|
|00000070| 65 63 6c 61 69 6d 69 6e | 67 20 72 65 63 75 72 73 |eclaimin|g recurs|
|00000080| 69 76 65 6c 79 20 61 6c | 6c 6f 63 61 74 65 64 20 |ively al|located |
|00000090| 6d 65 6d 6f 72 79 0a 43 | 6f 6e 74 65 6e 74 2d 54 |memory.C|ontent-T|
|000000a0| 79 70 65 3a 20 74 65 78 | 74 2f 70 6c 61 69 6e 3b |ype: tex|t/plain;|
|000000b0| 20 63 68 61 72 73 65 74 | 3d 75 73 2d 61 73 63 69 | charset|=us-asci|
|000000c0| 69 0a 4d 65 73 73 61 67 | 65 2d 49 44 3a 20 3c 44 |i.Messag|e-ID: <D|
|000000d0| 4b 4a 76 33 72 2e 6e 46 | 40 72 69 76 6d 2e 6e 6c |KJv3r.nF|@rivm.nl|
|000000e0| 3e 0a 54 6f 3a 20 62 76 | 61 72 6c 65 79 40 79 61 |>.To: bv|arley@ya|
|000000f0| 72 72 6f 77 2e 77 74 2e | 63 6f 6d 2e 61 75 0a 53 |rrow.wt.|com.au.S|
|00000100| 65 6e 64 65 72 3a 20 6e | 65 77 73 40 72 69 76 6d |ender: n|ews@rivm|
|00000110| 2e 6e 6c 0a 43 6f 6e 74 | 65 6e 74 2d 54 72 61 6e |.nl.Cont|ent-Tran|
|00000120| 73 66 65 72 2d 45 6e 63 | 6f 64 69 6e 67 3a 20 37 |sfer-Enc|oding: 7|
|00000130| 62 69 74 0a 4f 72 67 61 | 6e 69 7a 61 74 69 6f 6e |bit.Orga|nization|
|00000140| 3a 20 52 69 6a 6b 73 69 | 6e 73 74 69 74 75 75 74 |: Rijksi|nstituut|
|00000150| 20 76 6f 6f 72 20 56 6f | 6c 6b 73 67 65 7a 6f 6e | voor Vo|lksgezon|
|00000160| 64 68 65 69 64 20 65 6e | 20 4d 69 6c 69 65 75 68 |dheid en| Milieuh|
|00000170| 79 67 69 65 6e 65 2c 20 | 42 69 6c 74 68 6f 76 65 |ygiene, |Bilthove|
|00000180| 6e 2c 20 4e 4c 0a 52 65 | 66 65 72 65 6e 63 65 73 |n, NL.Re|ferences|
|00000190| 3a 20 3c 34 63 38 66 38 | 71 24 6c 6e 39 40 79 61 |: <4c8f8|q$ln9@ya|
|000001a0| 72 72 6f 77 2e 77 74 2e | 63 6f 6d 2e 61 75 3e 20 |rrow.wt.|com.au> |
|000001b0| 3c 34 63 38 6b 33 6f 24 | 6e 6b 6d 40 79 61 72 72 |<4c8k3o$|nkm@yarr|
|000001c0| 6f 77 2e 77 74 2e 63 6f | 6d 2e 61 75 3e 0a 4d 69 |ow.wt.co|m.au>.Mi|
|000001d0| 6d 65 2d 56 65 72 73 69 | 6f 6e 3a 20 31 2e 30 0a |me-Versi|on: 1.0.|
|000001e0| 44 61 74 65 3a 20 54 75 | 65 2c 20 32 20 4a 61 6e |Date: Tu|e, 2 Jan|
|000001f0| 20 31 39 39 36 20 31 30 | 3a 34 33 3a 30 32 20 47 | 1996 10|:43:02 G|
|00000200| 4d 54 0a 58 2d 4d 61 69 | 6c 65 72 3a 20 4d 6f 7a |MT.X-Mai|ler: Moz|
|00000210| 69 6c 6c 61 20 31 2e 31 | 4e 20 28 58 31 31 3b 20 |illa 1.1|N (X11; |
|00000220| 49 3b 20 4f 53 46 31 20 | 56 33 2e 30 20 61 6c 70 |I; OSF1 |V3.0 alp|
|00000230| 68 61 29 0a 58 2d 55 72 | 6c 3a 20 6e 65 77 73 3a |ha).X-Ur|l: news:|
|00000240| 34 63 38 6b 33 6f 24 6e | 6b 6d 40 79 61 72 72 6f |4c8k3o$n|km@yarro|
|00000250| 77 2e 77 74 2e 63 6f 6d | 2e 61 75 0a 0a 62 76 61 |w.wt.com|.au..bva|
|00000260| 72 6c 65 79 40 79 61 72 | 72 6f 77 2e 77 74 2e 63 |rley@yar|row.wt.c|
|00000270| 6f 6d 2e 61 75 20 28 62 | 72 75 63 65 20 76 61 72 |om.au (b|ruce var|
|00000280| 6c 65 79 29 20 77 72 6f | 74 65 3a 0a 3e 50 72 6f |ley) wro|te:.>Pro|
|00000290| 62 6c 65 6d 20 73 6f 6c | 76 65 64 2e 20 53 79 73 |blem sol|ved. Sys|
|000002a0| 74 65 6d 20 63 72 61 73 | 68 20 77 61 73 20 66 6f |tem cras|h was fo|
|000002b0| 72 20 6f 74 68 65 72 20 | 72 65 61 73 6f 6e 73 2e |r other |reasons.|
|000002c0| 20 52 6f 75 74 69 6e 65 | 20 61 73 0a 3e 70 72 65 | Routine| as.>pre|
|000002d0| 73 65 6e 74 65 64 20 61 | 70 70 65 61 72 73 20 74 |sented a|ppears t|
|000002e0| 6f 20 77 6f 72 6b 20 6e | 6f 77 2e 20 49 20 77 6f |o work n|ow. I wo|
|000002f0| 75 6c 64 20 73 74 69 6c | 6c 20 61 70 70 72 65 63 |uld stil|l apprec|
|00000300| 69 61 74 65 20 63 6f 6e | 66 69 72 6d 61 74 69 6f |iate con|firmatio|
|00000310| 6e 0a 3e 74 68 61 74 20 | 69 74 27 73 20 72 69 67 |n.>that |it's rig|
|00000320| 6f 72 6f 75 73 6c 79 20 | 73 6f 75 6e 64 2e 0a 3e |orously |sound..>|
|00000330| 0a 4c 6f 6f 6b 73 20 73 | 6f 75 6e 64 2c 20 62 75 |.Looks s|ound, bu|
|00000340| 74 20 73 61 66 65 74 79 | 20 73 74 69 6c 6c 20 64 |t safety| still d|
|00000350| 65 70 65 6e 64 73 20 6f | 6e 20 74 68 65 20 64 61 |epends o|n the da|
|00000360| 74 61 2d 63 6f 6e 66 69 | 67 75 72 61 74 69 6f 6e |ta-confi|guration|
|00000370| 2e 0a 69 66 20 61 6e 79 | 20 74 77 6f 20 6e 6f 64 |..if any| two nod|
|00000380| 65 73 20 77 6f 75 6c 64 | 20 22 73 68 61 72 65 22 |es would| "share"|
|00000390| 20 64 61 74 61 20 2c 20 | 62 79 20 68 61 76 69 6e | data , |by havin|
|000003a0| 67 20 70 6f 69 6e 74 65 | 72 73 20 74 6f 20 74 68 |g pointe|rs to th|
|000003b0| 65 0a 73 61 6d 65 20 6d | 61 6c 6c 6f 63 63 65 64 |e.same m|allocced|
|000003c0| 20 63 68 75 6e 6b 2c 20 | 74 68 65 20 66 69 72 73 | chunk, |the firs|
|000003d0| 74 20 63 61 6c 6c 20 74 | 6f 20 6e 6f 64 65 5f 66 |t call t|o node_f|
|000003e0| 72 65 65 28 29 20 77 6f | 75 6c 64 20 73 75 63 63 |ree() wo|uld succ|
|000003f0| 65 65 64 2c 0a 62 75 74 | 20 74 68 65 20 6e 65 78 |eed,.but| the nex|
|00000400| 74 20 63 61 6c 6c 20 28 | 74 72 79 69 6e 67 20 74 |t call (|trying t|
|00000410| 6f 20 66 72 65 65 28 29 | 20 6d 65 6d 6f 72 79 20 |o free()| memory |
|00000420| 61 6c 6c 72 65 61 64 79 | 20 66 72 65 65 29 20 63 |allready| free) c|
|00000430| 6f 75 6c 64 2f 77 6f 75 | 6c 64 0a 63 72 61 73 68 |ould/wou|ld.crash|
|00000440| 2e 20 54 68 69 73 20 6b | 69 6e 64 20 6f 66 20 74 |. This k|ind of t|
|00000450| 68 69 6e 67 20 63 61 6e | 20 68 61 70 70 65 6e 20 |hing can| happen |
|00000460| 69 66 20 79 6f 75 20 69 | 6e 73 65 72 74 20 74 68 |if you i|nsert th|
|00000470| 65 20 73 61 6d 65 20 6e | 6f 64 65 20 74 77 69 63 |e same n|ode twic|
|00000480| 65 2e 0a 0a 49 66 20 73 | 6f 6d 65 20 6f 66 20 74 |e...If s|ome of t|
|00000490| 68 65 20 6e 6f 64 65 20 | 64 61 74 61 20 77 6f 75 |he node |data wou|
|000004a0| 6c 64 20 6e 6f 74 20 62 | 65 20 6f 6e 20 74 68 65 |ld not b|e on the|
|000004b0| 20 68 65 61 70 20 2c 20 | 62 75 74 20 6a 75 73 74 | heap , |but just|
|000004c0| 20 61 20 6d 65 6d 6f 72 | 79 0a 72 65 66 65 72 65 | a memor|y.refere|
|000004d0| 6e 63 65 20 74 6f 20 73 | 6f 6d 65 20 22 64 65 66 |nce to s|ome "def|
|000004e0| 69 6e 65 64 22 20 6d 65 | 6d 6f 72 79 20 61 72 65 |ined" me|mory are|
|000004f0| 6e 61 2c 20 74 68 65 20 | 74 68 69 6e 67 20 63 6f |na, the |thing co|
|00000500| 75 6c 64 20 63 65 72 74 | 61 69 6e 6c 79 20 62 6c |uld cert|ainly bl|
|00000510| 6f 77 75 70 0a 49 66 20 | 79 6f 75 72 20 70 72 6f |owup.If |your pro|
|00000520| 67 72 61 6d 20 73 68 6f | 75 6c 64 20 64 6f 20 3a |gram sho|uld do :|
|00000530| 20 2a 2f 0a 6e 6f 64 65 | 2d 3e 6e 6f 64 65 5f 64 | */.node|->node_d|
|00000540| 61 74 61 20 3d 20 22 53 | 6f 6d 65 20 73 74 72 69 |ata = "S|ome stri|
|00000550| 6e 67 20 74 6f 20 62 65 | 20 73 74 6f 72 65 64 22 |ng to be| stored"|
|00000560| 20 3b 0a 2f 2a 0a 2c 20 | 74 68 65 6e 20 74 68 65 | ;./*., |then the|
|00000570| 20 6e 6f 64 65 20 77 6f | 75 6c 64 20 70 6f 69 6e | node wo|uld poin|
|00000580| 74 20 74 6f 20 61 20 73 | 74 72 69 6e 67 2d 6c 69 |t to a s|tring-li|
|00000590| 74 65 72 61 6c 20 73 6f | 6d 65 77 68 65 72 65 20 |teral so|mewhere |
|000005a0| 69 6e 20 74 68 65 0a 73 | 74 61 74 69 63 2d 64 61 |in the.s|tatic-da|
|000005b0| 74 61 2d 73 70 61 63 65 | 20 28 77 68 69 63 68 20 |ta-space| (which |
|000005c0| 69 73 20 6e 6f 74 20 66 | 72 65 65 61 62 6c 65 29 |is not f|reeable)|
|000005d0| 2e 0a 41 20 73 69 6d 69 | 6c 61 72 20 74 68 69 6e |..A simi|lar thin|
|000005e0| 67 20 68 61 70 70 65 6e | 73 20 69 66 20 79 6f 75 |g happen|s if you|
|000005f0| 20 63 6f 70 79 20 6e 6f | 64 65 73 2c 20 6c 69 6b | copy no|des, lik|
|00000600| 65 3a 20 2a 2f 0a 6e 6f | 64 65 20 2a 61 2c 20 2a |e: */.no|de *a, *|
|00000610| 62 3b 0a 2a 61 20 3d 20 | 2a 62 3b 0a 2f 2a 0a 2a |b;.*a = |*b;./*.*|
|00000620| 61 20 61 6e 64 20 2a 62 | 20 6e 6f 77 20 73 68 61 |a and *b| now sha|
|00000630| 72 20 61 6c 6c 20 6f 66 | 20 74 68 65 69 72 20 70 |r all of| their p|
|00000640| 6f 69 6e 74 65 72 73 2c | 20 73 6f 20 61 2d 3e 6e |ointers,| so a->n|
|00000650| 65 78 74 20 3d 3d 20 62 | 2d 3e 6e 65 78 74 20 65 |ext == b|->next e|
|00000660| 74 63 2e 0a 49 66 20 62 | 6f 74 68 20 2a 61 20 26 |tc..If b|oth *a &|
|00000670| 26 20 2a 62 20 61 72 65 | 20 69 6e 73 65 72 74 65 |& *b are| inserte|
|00000680| 64 20 69 6e 20 74 68 65 | 20 74 72 65 65 20 2c 20 |d in the| tree , |
|00000690| 79 6f 75 20 77 69 6c 6c | 20 6c 6f 73 65 2e 0a 0a |you will| lose...|
|000006a0| 54 68 65 20 73 61 66 65 | 73 74 20 77 61 79 20 74 |The safe|st way t|
|000006b0| 6f 20 65 6e 73 75 72 65 | 20 74 68 61 74 20 74 68 |o ensure| that th|
|000006c0| 69 73 20 77 6f 6e 74 20 | 68 61 70 70 65 6e 20 69 |is wont |happen i|
|000006d0| 73 20 62 79 20 61 6c 77 | 61 79 73 20 63 72 65 61 |s by alw|ays crea|
|000006e0| 74 69 6e 67 20 75 73 69 | 6e 67 0a 61 20 22 63 6f |ting usi|ng.a "co|
|000006f0| 6e 73 74 72 75 63 74 6f | 72 22 2d 66 75 6e 63 74 |nstructo|r"-funct|
|00000700| 69 6f 6e 2e 20 54 68 65 | 20 73 61 6d 65 20 67 6f |ion. The| same go|
|00000710| 65 73 20 66 6f 72 20 61 | 73 73 69 67 6e 6d 65 6e |es for a|ssignmen|
|00000720| 74 73 2e 0a 49 20 74 68 | 69 6e 6b 20 74 68 69 73 |ts..I th|ink this|
|00000730| 20 69 73 20 77 68 79 20 | 43 2b 2b 20 77 61 73 20 | is why |C++ was |
|00000740| 69 6e 76 65 6e 74 65 64 | 3a 20 42 6a 61 72 6e 65 |invented|: Bjarne|
|00000750| 20 77 61 73 20 67 65 74 | 74 69 6e 67 20 61 6e 6e | was get|ting ann|
|00000760| 6f 79 65 64 20 62 79 20 | 74 79 70 69 6e 67 20 69 |oyed by |typing i|
|00000770| 6e 0a 61 6c 6c 20 74 68 | 65 20 63 6f 6e 73 74 72 |n.all th|e constr|
|00000780| 75 63 74 6f 72 73 2f 64 | 65 73 74 72 75 63 74 6f |uctors/d|estructo|
|00000790| 72 73 20 3a 2d 29 20 2e | 20 0a 42 54 57 20 79 6f |rs :-) .| .BTW yo|
|000007a0| 75 72 20 66 75 6e 63 74 | 69 6f 6e 20 61 6c 77 61 |ur funct|ion alwa|
|000007b0| 79 73 20 72 65 74 75 72 | 6e 73 20 4e 55 4c 4c 2c |ys retur|ns NULL,|
|000007c0| 20 73 6f 20 69 74 20 63 | 6f 75 6c 64 20 62 65 20 | so it c|ould be |
|000007d0| 6d 61 64 65 20 76 6f 69 | 64 2e 0a 0a 48 61 70 70 |made voi|d...Happ|
|000007e0| 79 20 68 61 63 6b 69 6e | 67 2c 0a 41 64 72 69 61 |y hackin|g,.Adria|
|000007f0| 61 6e 20 76 61 6e 20 4b | 65 73 73 65 6c 2e 0a 0a |an van K|essel...|
+--------+-------------------------+-------------------------+--------+--------+